# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=a52dec
pkgver=0.8.0
pkgrel=10
pkgdesc="A free library for decoding ATSC A/52 streams."
url="https://liba52.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
makedepends="linux-headers"
source="https://distfiles.adelielinux.org/source/a52dec/a52dec-$pkgver.tar.gz
	fix-globals-test-x86-pie.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-shared
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
dbabc293ac5554b13ebbe43ca56278cb81478c5cc98b04c6805f5fc517a1484b0b7d23f5d6a64580d781f2976ff79e0646d9a1ebd48ab14005aa8d4128ecfeeb  a52dec-0.8.0.tar.gz
b8dbcdc817531bc737ee689a1a8fc76ba40462397ca95286fe834795a09df04cd68010ca6105c8e56392328bec00c838372ab28324c5428421d44824109ea6ec  fix-globals-test-x86-pie.patch
"
